package com.mc.lp.database.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/*
 * @author aphanda
 * @date Sep 14, 2014
 * @time 1:01:58 AM
 */

@Table
@Entity(name = "STUDENT_RECORD")
public class StudentRecordEntity extends MicroCampusBaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;


	@ManyToOne(cascade=CascadeType.ALL)
	@JoinColumn(name = "REGISTRATION_ID")
	private RegistrationEntity registrationID;

	@Column(name = "YEAR")
	private Integer year;

	// TODO Create School Grade entity
	@ManyToOne(cascade=CascadeType.ALL, fetch=FetchType.EAGER)
	@JoinColumn(name = "GRADE_ID")
	private SchoolGradeEntity schoolGradeID;

	// TODO To implement Attachment entity
	@Column(name = "ATTACHMENT_ID")
	private Integer attachmentID;

	public RegistrationEntity getRegistrationID() {
		return registrationID;
	}

	public void setRegistrationID(RegistrationEntity registrationID) {
		this.registrationID = registrationID;
	}

	public Integer getYear() {
		return year;
	}

	public void setYear(Integer year) {
		this.year = year;
	}

	public SchoolGradeEntity getSchoolGradeID() {
		return schoolGradeID;
	}

	public void setSchoolGradeID(SchoolGradeEntity schoolGradeID) {
		this.schoolGradeID = schoolGradeID;
	}

	public Integer getAttachmentID() {
		return attachmentID;
	}

	public void setAttachmentID(Integer attachmentID) {
		this.attachmentID = attachmentID;
	}
}
